<%@ page import="openvote.Candidato" %>



<div class="fieldcontain ${hasErrors(bean: candidatoInstance, field: 'numero', 'error')} required">
	<label for="numero">
		<g:message code="candidato.numero.label" default="Numero" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="numero" required="" value="${candidatoInstance?.numero}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: candidatoInstance, field: 'nome', 'error')} required">
	<label for="nome">
		<g:message code="candidato.nome.label" default="Nome" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="nome" required="" value="${candidatoInstance?.nome}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: candidatoInstance, field: 'partido', 'error')} required">
	<label for="partido">
		<g:message code="candidato.partido.label" default="Partido" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="partido" required="" value="${candidatoInstance?.partido}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: candidatoInstance, field: 'sexo', 'error')} ">
	<label for="sexo">
		<g:message code="candidato.sexo.label" default="Sexo" />
		
	</label>
	<g:select name="sexo" from="${candidatoInstance.constraints.sexo.inList}" value="${candidatoInstance?.sexo}" valueMessagePrefix="candidato.sexo" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: candidatoInstance, field: 'cpf', 'error')} ">
	<label for="cpf">
		<g:message code="candidato.cpf.label" default="Cpf" />
		
	</label>
	<g:textField name="cpf" value="${candidatoInstance?.cpf}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: candidatoInstance, field: 'idade', 'error')} required">
	<label for="idade">
		<g:message code="candidato.idade.label" default="Idade" />
		<span class="required-indicator">*</span>
	</label>
	<g:field name="idade" type="number" min="18" value="${candidatoInstance.idade}" required=""/>
</div>

<div class="fieldcontain ${hasErrors(bean: candidatoInstance, field: 'estadoCivil', 'error')} ">
	<label for="estadoCivil">
		<g:message code="candidato.estadoCivil.label" default="Estado Civil" />
		
	</label>
	<g:select name="estadoCivil" from="${candidatoInstance.constraints.estadoCivil.inList}" value="${candidatoInstance?.estadoCivil}" valueMessagePrefix="candidato.estadoCivil" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: candidatoInstance, field: 'RG', 'error')} ">
	<label for="RG">
		<g:message code="candidato.RG.label" default="RG" />
		
	</label>
	<g:textField name="RG" value="${candidatoInstance?.RG}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: candidatoInstance, field: 'dataNascimento', 'error')} required">
	<label for="dataNascimento">
		<g:message code="candidato.dataNascimento.label" default="Data Nascimento" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="dataNascimento" precision="day"  value="${candidatoInstance?.dataNascimento}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: candidatoInstance, field: 'endereco', 'error')} ">
	<label for="endereco">
		<g:message code="candidato.endereco.label" default="Endereco" />
		
	</label>
	<g:textField name="endereco" value="${candidatoInstance?.endereco}"/>
</div>

